#ifndef CHINARAWTOSACTHREAD_H
#define CHINARAWTOSACTHREAD_H

#include <QThread>
#include "util/define.h"
#include "datatype/database.h"
#include "datatype/chinaobs.h"
#include "QDateTime"
#include "config/common.h"
#include "datatype/sac_new.h"
class ChinarawToSacThread : public QThread
{
    Q_OBJECT
public:
    ChinarawToSacThread();
    ChinarawToSacThread( QList<QString> fileList,QString saveDirName,int interval,int yanchi);

    union
            {
            unsigned char byteval[4];
            short tbytev[2];
            int  fbytev;
    } threeB2long ;
    LONG getPointNumber(QString fileName);
    LONG getFileLength(QString fileName);
    LONG getCountNum(QList<QString> fileList);
signals:
    void fileFinish(QString name);
    void allFinish();
    void info(QString info);

protected:
    void run();
private :
    QList<QString> fileList;
    QString saveDirName;
    int interval;
    int yanchi;
    Common *common;
    unsigned int HextoInt(unsigned char datebyte);
signals:
    
public slots:
    
};

#endif // CHINARAWTOSACTHREAD_H
